** Table 4
* Islam vs. Rest
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest   if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus) 
xi: nbreg killingsfirstvictfirstterr  lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest   if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest   if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus) 
xi: nbreg killingsfirstvictfirstterr  lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest   if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest   if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus) 
xi: nbreg killingsfirstvictfirstterr  lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest   if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus) 

** Table 5
* Islam vs. Rest
xi: nbreg  allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest_coldwar  islamvrest_postcoldwar if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus)
* Testing equality of coefficients
test islamvrest_coldwar=islamvrest_postcoldwar
* Testing equality in conditional marginal effect at mean co-variate values
margins, dydx(islamvrest_coldwar islamvrest_postcoldwar) atmeans post vce(unconditional)
xi: nbreg  killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest_coldwar  islamvrest_postcoldwar if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus)  
test islamvrest_coldwar=islamvrest_postcoldwar
* Testing equality of coefficients
test islamvrest_coldwar=islamvrest_postcoldwar
* Testing equality in conditional marginal effect at mean co-variate values
margins, dydx(islamvrest_coldwar islamvrest_postcoldwar) atmeans post vce(unconditional)
test islamvrest_coldwar=islamvrest_postcoldwar

* Islam vs. West
xi: nbreg  allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest_coldwar  islamvwest_postcoldwar if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus)  
* Testing equality of coefficients
test islamvwest_coldwar=islamvwest_postcoldwar
* Testing equality in conditional marginal effect at mean co-variate values
margins, dydx(islamvwest_coldwar islamvwest_postcoldwar) atmeans post vce(unconditional)
test islamvwest_coldwar=islamvwest_postcoldwar
xi: nbreg  killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest_coldwar  islamvwest_postcoldwar if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus)
* Testing equality of coefficients
test islamvwest_coldwar=islamvwest_postcoldwar
* Testing equality in conditional marginal effect at mean co-variate values
margins, dydx(islamvwest_coldwar islamvwest_postcoldwar) atmeans post vce(unconditional)
test islamvwest_coldwar=islamvwest_postcoldwar

* Rest vs. West
xi: nbreg  allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest_coldwar  restvwest_postcoldwar if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus)  
* Testing equality of coefficients
test restvwest_coldwar=restvwest_postcoldwar
* Testing equality in conditional marginal effect at mean co-variate values
margins, dydx(restvwest_coldwar restvwest_postcoldwar) atmeans post vce(unconditional)
test restvwest_coldwar=restvwest_postcoldwar
xi: nbreg  killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest_coldwar  restvwest_postcoldwar if israel==0 & year>1968, robust nolrtest cluster( iddyadisr_rus)  
* Testing equality of coefficients
test restvwest_coldwar=restvwest_postcoldwar
* Testing equality in conditional marginal effect at mean co-variate values
margins, dydx(restvwest_coldwar restvwest_postcoldwar) atmeans post vce(unconditional)
test restvwest_coldwar=restvwest_postcoldwar

** Robustness tests
* Table 4, excluding intra-civilizational dyads
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest if israel==0 & intracivilization_rus==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest if israel==0 & intracivilization_rus==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0 & intracivilization_rus==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0 & intracivilization_rus==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest if israel==0 & intracivilization_rus==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest if israel==0 & intracivilization_rus==0, robust nolrtest cluster( iddyadisr_rus) 


* Table 4, with intra-civilizational dyad dummy var included
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  intracivilization_rus   islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr intracivilization_rus     islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  intracivilization_rus    restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr   intracivilization_rus   restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr intracivilization_rus   islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  intracivilization_rus     islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 


* Table 4, without samedyad control variable
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Table 4, dropping identical dyads from sample
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest if israel==0 & samedyad==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest if israel==0 & samedyad==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0 & samedyad==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0 & samedyad==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest if israel==0 & samedyad==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest if israel==0 & samedyad==0, robust nolrtest cluster( iddyadisr_rus) 



* Table 4, all three primary nationalities
* Islam vs. Rest
xi: nbreg victimtotalkilled lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg victimallincidents lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg victimtotalkilled lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg victimallincidents lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg victimtotalkilled lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg victimallincidents lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Table 4, Henderson classification
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest_hen if israel==0, robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest_hen if israel==0, robust nolrtest cluster( iddyadisr_hen) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest_hen if israel==0, robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest_hen if israel==0, robust nolrtest cluster( iddyadisr_hen) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest_hen if israel==0, robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest_hen if israel==0, robust nolrtest cluster( iddyadisr_hen) 

* Table 4, Henderson classification, including Israel
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest_hen , robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest_hen , robust nolrtest cluster( iddyadisr_hen) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest_hen , robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest_hen , robust nolrtest cluster( iddyadisr_hen) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest_hen , robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest_hen , robust nolrtest cluster( iddyadisr_hen) 


* Table 4, Russett classification, including Israel
preserve
replace islamvrest=1 if tercivrus=="islamic" & countrytarget=="Israel"
replace restvwest=1 if tercivrus!="western" & countrytarget=="Israel"
replace islamvwest=1 if tercivrus=="islamic" & countrytarget=="Israel"

* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest, robust nolrtest cluster( iddyadisr_hen)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest, robust nolrtest cluster( iddyadisr_hen) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

restore


* Table 4, terror attacks of "Indeterminate Arabs, Palestine" allocated randomly to 10 big Arab countries with few misssings (Algeria, Egypt, Jordan, Mali, Morocco, Saudi Arabia, Sudan, Syria, Tunisia, Yemen)
preserve

capture drop random
generate random=uniform()
replace  countryallterrorists="Algeria" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random<.1
replace  countryallterrorists="Egypt, Arab Rep." if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.1 & random<.2
replace  countryallterrorists="Jordan" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.2 & random<.3
replace  countryallterrorists="Mali" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.3 & random<.4
replace  countryallterrorists="Morocco" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.4 & random<.5
replace  countryallterrorists="Saudi Arabia" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.5 & random<.6
replace  countryallterrorists="Sudan" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.6 & random<.7
replace  countryallterrorists="Syrian Arab Republic" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.7 & random<.8
replace  countryallterrorists="Tunisia" if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.8 & random<.9
replace  countryallterrorists="Yemen, Rep." if  countryallterrorists=="Indeterminate Arabs, Palestine" & random>=.9 & random<1

keep country* year allincidentsfirstvictfirstterr killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance  islamvwest islamvrest  restvwest   intercivilization_rus iddyadisr_rus israel
collapse (sum) allincidentsfirstvictfirstterr killingsfirstvictfirstterr (mean) lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance  islamvwest islamvrest  restvwest   intercivilization_rus iddyadisr_rus israel, by( countryallterrorists countrytarget year)

* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr     islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr       islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

restore


* Table 4 with bilateral trade vars
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  bilattradegdpcombined    islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  bilattradegdpcombined     islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr bilattradegdpcombined      restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr   bilattradegdpcombined    restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr bilattradegdpcombined    islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  bilattradegdpcombined      islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 


* Table 4 with conflict in terror or target countries
* Islam vs. Rest
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  type1and2target type1and2terrorists type3and4target type3and4terrorists     islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  type1and2target type1and2terrorists type3and4target type3and4terrorists      islamvrest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Rest vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr   type1and2target type1and2terrorists type3and4target type3and4terrorists     restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr   type1and2target type1and2terrorists type3and4target type3and4terrorists     restvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: nbreg killingsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr  type1and2target type1and2terrorists type3and4target type3and4terrorists    islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus)
xi: nbreg allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew  gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr    type1and2target type1and2terrorists type3and4target type3and4terrorists     islamvwest if israel==0, robust nolrtest cluster( iddyadisr_rus) 


* Table 4 with zero-inflated negative binomial estimator
* Islam vs. Rest
xi: zinb allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest   if israel==0 & year>1968, inf(lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest) cluster( iddyadisr_rus) 
xi: zinb killingsfirstvictfirstterr  lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest   if israel==0 & year>1968, inf(lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvrest)robust nolrtest cluster( iddyadisr_rus) 

* Islam vs. West
xi: zinb allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest   if israel==0 & year>1968, inf(lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest) cluster( iddyadisr_rus) 
xi: zinb killingsfirstvictfirstterr  lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest   if israel==0 & year>1968, inf(lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      islamvwest) cluster( iddyadisr_rus) 

* Rest vs. West
xi: zinb allincidentsfirstvictfirstterr lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest   if israel==0 & year>1968, inf(lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest) cluster( iddyadisr_rus) 
xi: zinb killingsfirstvictfirstterr  lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest   if israel==0 & year>1968, inf(lnpoptarg lnpopterr  demdemdyadnew autocdemdyadnew autocautocdyadnew gdpterrshare  contiguity4dummy samedyad lndistance   ltype4allied latopallyextended  larmsexp2005usd_milexpcomb  lODApergdpterr      restvwest) cluster( iddyadisr_rus) 
